feat(bitwarden): add Bitwarden extension#258
Closed
asm0dey wants to merge 1 commit into
Closed
Conversation
Adds a Vicinae extension for managing a Bitwarden vault via the rbw CLI. Supports self-hosted Bitwarden and Vaultwarden. Commands: search, authenticator (TOTP), generate password (view + quick), create login, sync vault, lock vault, log out. Requires `rbw` to be installed on the user's system; the extension surfaces a clear error if it is missing. No binaries are downloaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Bitwarden extension
This PR adds a new
bitwardenextension underextensions/bitwarden/. It exposes a Vicinae UI on top of the third-partyrbwBitwarden CLI, supporting both upstream Bitwarden and self-hosted Vaultwarden deployments.Motivation — why a native extension instead of Raycast compat
The official Raycast Bitwarden extension is not usable on Linux Vicinae for two structural reasons, neither fixable in a compat shim:
"platforms": ["macOS", "Windows"]and its API layer downloads the officialbwCLI binary scoped to macOS or Windows targets (seesrc/api/bitwarden.ts,cliInfo.downloadUrl). There is no Linux download path. Running the Windows binary under Wine is the typical workaround and is fragile; the macOS binary will not run on Linux at all.bwsession alive in-process across commands. Vicinae commands are short-lived (view/no-view/menu-bar) — each invocation spawns a fresh process and shares no in-memory state, so the officialbwCLI's session token would either be re-issued (and re-prompted) on every command or would have to be persisted to disk by the extension itself.rbwsolves this externally via its ownrbw-agent(ssh-agent style), which is the right boundary for a credential-bearing daemon: it lives outside the extension, the user controls its lifetime, and the extension never holds the master password.The result is a Linux-native Vicinae extension that does not download any binary, does not store the master password, and reuses an existing well-known agent (
rbw-agent) for session persistence.What it does
Eight commands:
searchauthenticatortotpURIgenerate-passwordgenerate-password-quickcreate-loginsync-vaultlock-vaultlogout-vaultCategories:
Productivity,Security.Requirements
The extension shells out to
rbwfor all vault operations. It does not download any binary. Ifrbwis missing or not on the user'sPATH(or at the configuredcliPath), commands surface a clearBwNotFounderror instructing the user to installrbwthemselves.Self-hosted Bitwarden / Vaultwarden is supported via the
serverUrlpreference. Self-signed CA bundles can be provided viaserverCertsPathand are injected asSSL_CERT_FILEfor therbwchild process.Validation
Run inside
extensions/bitwarden/:npx vici lint— manifest valid.npx vici build— built successfully (8 entrypoints).npm run lint— clean (eslint v9, flat config).npm test— 72 tests pass across 11 files (rbw adapter, vault, crypto cache, totp, prefs, mutex, errors).npm install—package-lock.jsongenerated,0 vulnerabilities.How to test
rbwon the system.clientIdandclientSecret(Bitwarden API key from Settings → Security → Keys). For self-hosted, also setserverUrl.rbwsession.Sensitive fields (passwords, secure notes, card data, identity fields) are never written to disk. The optional encrypted local cache (
shouldCacheVaultItems) only holds non-sensitive metadata (names, URIs, folder ids) for fast list rendering and is keyed by the master password.Compliance with GUIDELINES.md
extensions/bitwarden/matches manifestname.package-lock.jsongenerated withnpm install(per "we only support npm" note in.gitignore).bun.locknot included.@vicinae/api. Does not use@raycast/api.assets/icon.png, 2048×2048, 1:1.description. Extensiondescriptionis concise.rbw) is a well-known, user-installed CLI.AI Disclosure
This extension was developed with the assistance of Claude Code (Anthropic). The TypeScript source, manifest, README, tests, and this PR description were drafted with AI assistance and reviewed line-by-line by the contributor before submission. The choice of architecture (rbw subprocess wrapper, encrypted non-sensitive metadata cache, master-password reprompt grace window, shared TOTP clock) was made by the contributor; AI was used to implement and refactor against that design. The contributor reviewed all output before submission. Review responses may continue to use AI assistance; all responses will be reviewed and verified by the contributor before posting.